<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Table definitions</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="session-pgsql.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="session-pgsql.constants.html">预定义常量</a></div>
 <div class="up"><a href="book.session-pgsql.html">Session PgSQL</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="session-pgsql.tables" class="chapter">
 <h1>Table definitions</h1>

 <p class="para">
  Session table definition
  <div class="example-contents">
<div class="sqlcode"><pre class="sqlcode">CREATE TABLE php_session (
 sess_id            text,
 sess_name          text,
 sess_data          text,
 sess_created       integer,
 sess_modified      integer,
 sess_expire        integer,
 sess_addr_created  text,
 sess_addr_modified text,
 sess_counter       integer,
 sess_error         integer,
 sess_warning       integer,
 sess_notice        integer,
 sess_err_message   text,
 sess_custom        text
);

CREATE INDEX php_session_idx ON php_session USING BTREE (sess_id);</pre>
</div>
  </div>

 </p>
 <div class="warning"><strong class="warning">Warning</strong>
  <p class="para">
   If you use <em>HASH</em> for <em>INDEX</em>, you&#039;ll
   have a deadlock problem when the server load is
   <em class="emphasis">very</em> high. Even if it&#039;s unlikely to have a deadlock
   under normal operation, it can occur. <em class="emphasis">Do not use
   <em>HASH</em> for <em>INDEX</em></em>.
  </p>
 </div>
 <p class="para">
  You may change the session table as long as all fields are defined.
 </p>
 <p class="para">
  Application variables table definition
  <div class="example-contents">
<div class="sqlcode"><pre class="sqlcode">CREATE TABLE php_app_vars (
 app_modified       integer,
 app_name           text,
 app_vars           text
);</pre>
</div>
  </div>

 </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="session-pgsql.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="session-pgsql.constants.html">预定义常量</a></div>
 <div class="up"><a href="book.session-pgsql.html">Session PgSQL</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
